<div class="view-header">
    <div class="view-header-left">
        <!-- 查询 -->
        <div class="view-header-item no-widen" ng-click="submit()" title="同步用户到角色">
            <i class="fa fa-refresh"></i>
        </div>
    </div>
</div>

<div class="view-content">
    <div class="view-left privilege-left">
        <div class="view-left-search">
            <input type="text" placeholder='Search' ng-model="user_name_filter">
            <i class="fa fa-search"></i>
        </div>
        <div class="view-left-block">
            <div class="view-left-item"
                 ng-repeat="item in user_data |orderBy:['username'] | filter:user_name_filter"
                 ng-click='user_ranks_show(item)'
                 ng-class="{true: 'marked', false: ''}[item.iscolor]">
                <li>
                    <i class="fa fa-user"></i>
                </li>
                <li class="view-left-item-user">
                    {{item.name}}
                </li>
                <li>
                    门店:{{item.shop_name}}
                </li>
            </div>
        </div>
    </div>
    <div class="privilege-right">
        <div class="privilege-right-content">
            <div class="view-left-search privilege-und-bg">
                <input type="text" placeholder='未分配的岗位' ng-model="ranks_und">
            </div>
            <div class="privilege-right-block">
                <div class="privilege-right-item" ng-repeat="item in cur_user_unassigned_ranks |orderBy:['name'] |filter:ranks_und" ng-click="add_rank(item)">
                    <li class="privilege-right-name">{{item.name}}</li>
                    <li class="privilege-right-plus">
                        <i class="fa fa-plus"></i>
                    </li>
                </div>
            </div>
        </div>
        <div class="privilege-right-content">
            <div class="view-left-search">
                <input type="text" placeholder='已有岗位' ng-model="ranks_exi">
            </div>
            <div class="privilege-right-block">
                <div class="privilege-right-item" ng-repeat="item in cur_user_assigned_ranks |orderBy:['name'] |filter:ranks_exi" ng-click="remove_rank(item)">
                    <li class="privilege-right-name">{{item.name}}</li>
                    <li class="privilege-right-plus">
                        <i class="fa fa-minus"></i>
                    </li>
                </div>
            </div>
        </div>
        <div class="privilege-right-content">
            <div class="view-left-search privilege-role-bg">
                <input type="text" placeholder='角色' ng-model="role">
            </div>
            <div class="privilege-right-block">
                <div class="privilege-right-item" ng-repeat="item in cur_user_roles |orderBy:['rolename'] |filter:role">
                    <li class="privilege-right-name">{{item.rolename}}</li>
                </div>
            </div>
        </div>
    </div>
</div>







<!-- <div class="container-fluid common-main">

    <div class="row common-head">
        <div class="col-xs-3">
            <div class="common-head-search">
                <input class="clear-input" type="text" placeholder='Search'
                ng-model="user_name_filter">
                <span class="glyphicon glyphicon-search common-search-icon"></span>
            </div>
        </div>
        <div class="col-xs-9 border-left common-head-content">
            <div class="row">
                <div class="col-xs-12">
                    <div class="left">用户<span class="color-show">{{cur_user.name}}</span>的岗位分配</div>
                    <div class="right">
                        <input type="button" class="common-button-add" ng-click="submit()" value="同步用户到角色">
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="row common-content common-column">
        <div class="col-md-3 common-content-block">
            <div class="row common-content-list user-list bg-privileges"
                ng-repeat="item in user_data |orderBy:['username'] | filter:user_name_filter"
                ng-click='user_ranks_show(item)'
                ng-class="{true: 'color-privileges', false: 'color-privileges-default'}[item.iscolor]">
                <div class="col-xs-12">
                    <li>
                        <span class="glyphicon glyphicon-user"></span>
                        {{item.name}}
                    </li>
                    <li>门店：{{item.shop_name}}</li>
                </div>
            </div>
        </div>
        <div class="col-md-9 border-left role-assign">
            <div class="col-md-4 role-all">
                <div class="row role-search">
                    <input class="clear-input role-bg-all" type="text"
                    placeholder='未分配岗位' ng-model="ranks_und">
                </div>
                <div class="row role-all-content">
                    <div class="role-all-content-block col-md-12">
                        <div class="row role-item" ng-repeat="item in cur_user_unassigned_ranks |orderBy:['name'] |filter:ranks_und" ng-click="add_rank(item)">
                            <div class="col-xs-12">
                                {{item.name}}
                                <span class="glyphicon glyphicon-plus"></span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-md-4 role-all ">
                <div class="row role-search">
                    <input class="clear-input role-bg-del" type="text" placeholder='已有岗位' ng-model="ranks_exi">
                </div>
                <div class="row role-all-content">
                    <div class="role-all-content-block col-md-12">
                        <div class="row role-item" ng-repeat="item in cur_user_assigned_ranks |orderBy:['name'] |filter:ranks_exi" ng-click="remove_rank(item)">
                            <div class="col-xs-12">
                                {{item.name}}
                                <span class="glyphicon glyphicon-minus"></span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-md-4 role-all ">
                <div class="row role-search">
                    <input class="clear-input bg-privileges-role" type="text" placeholder='角色' ng-model="role">
                </div>
                <div class="row role-all-content">
                    <div class="role-all-content-block col-md-12">
                        <div class="row role-item" ng-repeat="item in cur_user_roles |orderBy:['rolename'] |filter:role">
                            <div class="col-xs-12">
                                {{item.rolename}}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div> -->